
<h1><?php echo $title; ?></h1>
<div class="noprint">
<?php if (isset($notice) || $notice = $this->session->flashdata('notification')):?>
<p class="notice"><?php echo $notice;?></p>
<?php endif;?>

<?php if (!$rows) : ?>
<p class="notice"><?php echo __("Nessuno risultato", $module);?></p>
<?php endif; ?>

<form method='post' action="<?php echo site_url('adozioni/contabilita/offerte/ultime') ?>" >
<div class="filter">

<label for="filter[id_missione]"><?php echo __("Missione", $module) ?></label>
<select name="filter[id_missione]">
<?php foreach($missioni as $m): ?>
<option value="<?php echo $m['id'] ?>" <?php if($m['id'] == $filter['id_missione']) echo " selected "; ?>><?php echo $m['nome']; ?></option>
<?php endforeach; ?>
</select>

<label for="filter[sostenitore]"><?php echo __("Sostenitore", $module) ?></label>
<input type="text" name="filter[sostenitore]" id="filter[sostenitore]" value="<?php if(isset($filter['sostenitore'])) echo $filter['sostenitore'] ?>" />
<label for="filter[assistito]"><?php echo __("Assistito", $module) ?></label>
<input type="text" name="filter[assistito]" id="filter[assistito]" value="<?php if(isset($filter['assistito'])) echo $filter['assistito'] ?>" />
<input type="submit" name="submit" value="   <?php echo __('Ok', $module) ?>   " />

</div>
</form>
</div>
<table class="list" cellpadding=3 >
	<thead>
		<tr>
				<th width="3%" class="center">#</th>
				<th><?php echo anchor('adozioni/contabilita/offerte/ultime/order_by/id_adozione', __("Scheda", $module), array('id' => 'id_adozione'))?></th>
				<th><?php echo anchor('adozioni/contabilita/offerte/ultime/order_by/s.nomecognome',__("Sostenitore", $module), array('id' => 's.nomecognome'))?></th>
				<th><?php echo anchor('adozioni/contabilita/offerte/ultime/order_by/a.nomecognome',__("Assistito", $module), array('id' => 'a.nomecognome'))?></th>
				<th><?php echo anchor('adozioni/contabilita/offerte/ultime/order_by/data',__("Data", $module))?></th>
				<th><?php echo anchor('adozioni/contabilita/offerte/ultime/order_by/valore',__("Donazione", $module))?></th>
		</tr>
	</thead>
	<tbody>
<?php if ($rows) : ?>
<?php $i = 1; foreach ($rows as $row): ?>
<?php if ($i % 2 != 0): $rowClass = 'odd'; else: $rowClass = 'even'; endif;?>
		<tr class="<?php echo $rowClass?>">
				<td class="center"><?php echo $i?></td>
				<td><?php echo $row['id_adozione'] ?></td>
				<td><?php echo $row['sostenitore'] ?></td>
				<td><?php echo $row['assistito'] ?></td>
				<td><?php echo data($row['data']) ?></td>
				<td align="right" class="total"><?php echo format_euro($row['valore']) ?></td>
		</tr>
<?php $i++; endforeach; ?>
<?php endif; ?>
</tbody>
</table>	